package com.example.aslongastoday.ui.mine;

import android.os.Bundle;

import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentManager;

import android.view.LayoutInflater;
import android.view.MotionEvent;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;

import com.example.aslongastoday.R;

public class VersionFragment extends Fragment implements View.OnTouchListener{

    private View view;
    private ImageView iv_back;
    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
                             Bundle savedInstanceState) {
        // Inflate the layout for this fragment
        view  =inflater.inflate(R.layout.fragment_version, container, false);
        iv_back = view.findViewById(R.id.iv_back);
        view.setOnTouchListener(this);

        iv_back.setOnClickListener(new View.OnClickListener() {
            private FragmentManager fragmentManager;
            @Override
            public void onClick(View v) {
                //退出fragment
                fragmentManager = getActivity().getSupportFragmentManager();
                fragmentManager.popBackStack();
            }
        });
        return view;
    }

    @Override
    public boolean onTouch(View view, MotionEvent motionEvent) {
        return true;
    }
}